# 离线脚本

import django
import os
import sys

base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(base_dir)

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tracer.settings")
# 模拟django启动
django.setup()  # 读取 os.environ["DJANGO_SETTINGS_MODULE"]

from web import models
models.UserInfo.objects.create(username="陈硕", email='chenshuo@live.com', mobile_phone='13654563215', password="12345678")